package org.jeecg.modules.coupon.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.zixishi.entity.Quyu;
import org.jeecg.modules.zixishi.entity.Zixishi;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 我的优惠券
 * @Author: jeecg-boot
 * @Date:   2024-06-28
 * @Version: V1.0
 */
@Data
@TableName("sr_my_coupon")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="sr_my_coupon对象", description="我的优惠券")
public class MyCoupon implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	/**用户*/
	@Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id")
	@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
    @ApiModelProperty(value = "用户")
    private java.lang.String sysUserId;
    @ApiModelProperty(value = "电话")
    private java.lang.String phone;
    @ApiModelProperty(value = "订单")
    private java.lang.String orderId;
	/**自习室*/
	@Excel(name = "自习室", width = 15, dictTable = "sr_zixishi", dicText = "name", dicCode = "id")
	@Dict(dictTable = "sr_zixishi", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "自习室")
    private java.lang.String zixishiId;
	/**区域*/
	@Excel(name = "区域", width = 15, dictTable = "sr_quyu", dicText = "name", dicCode = "id")
	@Dict(dictTable = "sr_quyu", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "区域")
    private java.lang.String quyuId;
	/**名称*/
	@Excel(name = "名称", width = 15)
    @ApiModelProperty(value = "名称")
    private java.lang.String couponName;
	/**原金额*/
	@Excel(name = "原金额", width = 15)
    @ApiModelProperty(value = "原金额")
    private java.math.BigDecimal origAmt;
	/**优惠金额*/
	@Excel(name = "优惠金额", width = 15)
    @ApiModelProperty(value = "优惠金额")
    private java.math.BigDecimal disAmt;
	/**有效期开始时间*/
	@Excel(name = "有效期开始时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "有效期开始时间")
    private java.util.Date effectStartDate;
	/**有效期结束时间*/
	@Excel(name = "有效期结束时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "有效期结束时间")
    private java.util.Date effectEndDate;
	/**开始使用时间*/
	@Excel(name = "开始使用时间", width = 20)
    @ApiModelProperty(value = "开始使用时间")
    private String useStartTime;
	/**结束使用时间*/
	@Excel(name = "结束使用时间", width = 20)
    @ApiModelProperty(value = "结束使用时间")
    private String useEndTime;
	/**使用状态*/
	@Excel(name = "使用状态", width = 15, dicCode = "coupon_use_status")
	@Dict(dicCode = "coupon_use_status")
    @ApiModelProperty(value = "使用状态")
    private java.lang.Integer useStatus;
	/**使用时间*/
	@Excel(name = "使用时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "使用时间")
    private java.util.Date useTime;
	/**时长*/
	@Excel(name = "时长", width = 15)
    @ApiModelProperty(value = "时长")
    private java.lang.Integer duration;
    /**剩余时长*/
    @Excel(name = "时长", width = 15)
    @ApiModelProperty(value = "时长")
    private java.lang.Double durationLeft;
	/**类型*/
	@Excel(name = "类型", width = 15, dicCode = "coupon_type")
	@Dict(dicCode = "coupon_type")
    @ApiModelProperty(value = "类型")
    private java.lang.Integer couponType;
    /**是否允许多次使用*/
    @Excel(name = "是否允许多次使用", width = 15, dicCode = "yn")
    @Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否允许多次使用")
    private java.lang.Integer multipleFlag;
	/**创建人*/
    @Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private java.lang.String sysOrgCode;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "作废日期")
    private Date endDate;

    @ApiModelProperty("美团code")
    private String receiptCode;

    @ApiModelProperty("美团名称")
    private String receiptTitle;

    @TableField(exist = false)
    private Quyu quyu;
    @TableField(exist = false)
    private Zixishi zixishi;


}
